package dhtpdud;

public class Java_4_10 {
	public static void main ( String[] args ){
		
		int[] ken = {10,20,30,40,50};
		int i, ave, sum=0;
		
		System.out.println("***** result *****");
		

		for (i=0; i<5; i++) {
			System.out.println("arr["+i+"] = "+ken[i]);
		}
		
		for (i=0; i<5; i++) {
			sum += ken[i];
		}
		
		ave = sum/5;
		
		System.out.println("sum = "+sum);
		System.out.println("average = "+ave);
	}
}
